<?php

/**
 * Base class for all interceptors.
 * 
 * @package SpotLight.core.events
 * @version since 0.5.x.x ; in older version was "Filter" instead "Interceptor".
 * @author asmhack
 * @license GPL
 * @copyright Serhiy Zaporozhets'
 */
class Interceptor {
   
   /**
    * Responce object. Provide permission to change actions responce or filtrate it or other actions...
    * @var Responce
    */
   protected $responce;
   
   /**
    * If contructor will be overriden then at first call parent.
    * @return unknown_type
    */
   public function __construct() {
      
      $this->responce = Response::getInstance ();
   }
   
   /**
    * 
    * Main logic of interceptor. 
    * @param Action $actionContext - action that execute now. 
    * @return boolean If return false than current action will be stopped and all other (forwarded actions) will be stopped too. To resume action executing return true. 
    */
   public function execute(Action $actionContext) {
      return true;
   }
}

?>